<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body,
        #app {
            width: 100%;
            height: 100%;
        }

        img {
            width: 300px;
            height: 300px;
        }

        b {
            background-color: pink;
            padding: 10px;
            margin: 10px;
        }
        .on{
            background: orange;
        }
    </style>
</head>

<body>
    <div id="app">
        <img v-for="(item,index) in list" :src="item" v-show="activeIndex==index">
        <div>
            <b v-for="(item,index) in list" @click="activeIndex=index" :class="{on:activeIndex==index}">{{index}}</b>
        </div>
    </div>
    <script src="./vue.js"></script>
    <script>
        const vue = new Vue({
            el: '#app',
            data: {
                activeIndex: 0,
                list: [
                    './img/26.jpg',
                    './img/27.jpg',
                    './img/28.jpg',
                    './img/29.jpg',
                ],
            }
        })
    </script>
</body>

</html>